<template>
  <FileList v-model:fileList="fileList" :data="{ id: user.userId!, type: null }">
    <template #title>
      <p class="text-xs font-medium py-2">我的文件：</p>
    </template>
  </FileList>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { IFileListItem } from "@/types/file";
import { useUser } from "@/store/modules/user";
import FileList from "../components/FileList.vue";
import { HandelFileList } from "@/utils/file";
const user = useUser();
const fileList = ref<IFileListItem[]>([]);
async function GetMessageFileByOwn() {
  let res = await window.electronApi.getMessageFileByOnwer(user.userId!);
  fileList.value = HandelFileList(res);
}
GetMessageFileByOwn();
</script>

<style lang="scss" scoped></style>
